/* Browser HomePage scss file */

// COLORS
$color-text: #eee;
$color-background: #2c2c2c;
$color-border: #888;
// FOCUSED
$focused-border: 1px solid #fff;
$focused-box-shadow: 0 0 5px #ddd;
// Links
$color-link-unfocused: #ccc;
$color-link-focused: #fff;
// Transitions
$transition-fast: all 0.2s linear;
// MODALS
$modal-box-shadow: 0 0 5px #333;
// Overlay
$overlay-background: #000;
// CALENDAR
$calendar-today: #ddd;
//
// IMPORT FONTS //
@font-face {
    font-family: "Lato";
    src: url('fonts/LatoLatin-Regular.woff');
}

@font-face {
    font-family: "Lato";
    src: url('fonts/LatoLatin-Bold.woff');
    font-weight: 700;
}


/* CODE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: $color-text;
    background-color: $color-background;
    height: 100vh;
}

.container {
    display: flex;
    flex-flow: column;
}

.search {
    margin: 50px auto 0;
    max-width: 700px;
    position: relative;
    width: 100%;
}

.search-box {
    font-family: 'Lato';
    background-color: $color-background;
    border: 1px solid $color-border;
    height: 40px;
    width: 700px;
    max-width: 100%;
    color: $color-text;
    font-size: 20px;
    padding: 0 35px 0 20px;
    transition: $transition-fast;
}

.search-box:focus,
.search-box:active {
    border: $focused-border;
    box-shadow: $focused-box-shadow;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 11px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: $transition-fast;
    font-weight: 400;
    color: $color-border;
    font-size: 18px;
}

.search-box:focus+.search-clear {
    color: $color-text;
}

input[type="text"] {
    background-color: $color-background;
    border: 1px solid $color-border;
    height: 40px;
    color: $color-text;
    font-size: 16px;
    padding: 0 12px;
    transition: 0.2s linear;
}

input[type="text"]:focus {
    border: $focused-border;
    box-shadow: $focused-box-shadow;
}

.clock {
    text-align: center;
    width: 700px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    margin-bottom: 30px;
    cursor: pointer;
}

.clock .time {
    font-weight: 700;
    font-size: 100px;
    margin: 10px;
}

.clock .date {
    font-weight: 400;
    font-size: 18px;
    word-spacing: 5px;
}

.modal {
    background-color: $color-background;
    border: 1px solid $color-border;
    ;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: $modal-box-shadow;
    z-index: 5;
    transition: $transition-fast;
    opacity: 0;
    display: none;
    padding: 40px 20px;
}

.calendar-modal {
    max-width: 100%;
    width: 500px;
    height: auto;
    border: 1px solid $color-border;
    ;
    background-color: $color-background;
    position: fixed;
    top: 50px;
    right: 0;
    left: 0;
    margin: 0 auto;
    z-index: 5;
    box-shadow: $modal-box-shadow;
    display: flex;
    visibility: hidden;
    opacity: 0;
    justify-content: center;
    padding: 50px 0;
    transition: visibility 0s, opacity 0.2s linear;
}

.calendar-container {
    display: block;
}

.cal-buttons-container {
    display: flex;
    margin-bottom: 10px;
}

.time-left {
    margin-top: 20px;
    text-align: center;
}

.cal-button {
    width: 35px;
    height: 35px;
    border: $focused-border;
    border-radius: 100%;
    background: $color-background;
    color: $color-text;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    -moz-user-select: none;
}

.cal-arrow-right {
    position: absolute;
    top: 6px;
    left: 12px;
}

.cal-arrow-left {
    position: absolute;
    top: 6px;
    right: 12px;
}

.cal-month-name {
    flex-grow: 2;
    text-align: center;
}

.cal-day-titles {
    display: flex;
    flex-flow: row;
    margin-bottom: 5px;
}

.cal-day-titles h3 {
    width: 50px;
    text-align: center;
}

.cal-week {
    display: flex;
    flex-flow: row;
}

.cal-week:nth-child(-n+1) .day {
    border-top: 1px solid $color-border;
    ;
}

.cal-week .day:nth-last-child(1) {
    border-right: 1px solid $color-border;
    ;
}

.day {
    width: 50px;
    height: 50px;
    border-bottom: 1px solid $color-border;
    ;
    border-left: 1px solid $color-border;
    ;
    line-height: 50px;
    text-align: center;
    font-size: 18px;
}

.today {
    background-color: $calendar-today;
    color: $color-background;
}

.day.prev-month {
    color: $color-border;
    ;
    cursor: pointer;
}

.day.next-month {
    color: $color-border;
    ;
    cursor: pointer;
}

.overlay {
    z-index: -1;
    width: 100%;
    height: 100%;
    background-color: #000;
    position: fixed;
    top: 0;
    visibility: hidden;
    opacity: 0;
    transition: $transition-fast;
}

.calendar-modal.visible {
    opacity: 1;
    visibility: visible;
}

.overlay.visible {
    opacity: 0.4;
    z-index: 4;
    visibility: visible;
}

h1:after {
    content: '';
    width: 100%;
    height: 2px;
    background-color: $color-text;
    display: block;
}

.part {
    width: 300px;
    max-width: 100%;
    min-height: 150px;
    margin: 20px;
}

.links {
    padding: 20px 0 0 0;
    font-size: 20px;
    color: $color-link-unfocused;
}

.links a {
    padding: 5px 0 5px 30px;
    color: $color-border;
    ;
    text-decoration: none;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    outline: 0;
}

.links a:hover,
a:focus {
    color: $color-link-focused;
}

.configurator {
    margin-top: 100px;
}

.configurator-appearance {
    width: 100% !important;
}

.outer-slides-container {
    overflow-x: hidden;
}

.slides-container {
    display: flex;
    flex-flow: row;
    transition: transform 0.2s ease-in-out;
    position: relative;
}

.slide {
    min-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 70px;
    transition: margin 0.2s ease-in-out;
    max-width: 1000px;
    align-content: flex-start;
    /* Fixes weird vertical spacing between .parts */
}

.arrow {
    position: fixed;
    top: 50%;
    width: 50px;
    height: 50px;
    border: $focused-border;
    cursor: pointer;
    transform: translate(0, -50%);
    font-size: 40px;
    line-height: 50px;
    margin: 10px;
    color: $color-link-focused;
    user-select: none;
    -moz-user-select: none;
    border-radius: 50%;
    z-index: 2;
}

.left-arrow {
    left: 0;
}

.right-arrow {
    right: 0;
    padding-left: 13px;
}

.buttons-container {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

.slide-button,
.notes-launcher {
    height: 40px;
    width: 100px;
    border-bottom: 1px solid transparent;
    color: $color-border;
    ;
    display: inline-block;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
}

.slide-button:hover,
.notes-launcher:hover {
    border-color: $color-border;
    ;
}

.btn-active {
    color: #fff;
    border-color: #fff !important;
}

.notes-modal {
    width: 100%;
    height: 0;
    /* height set to 0 to prevent screen flickering when new tab is opened */
    background-color: $color-background;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    overflow-y: scroll;
    transition: visibility 0s, opacity 0.2s linear;
}

.notes-modal.visible {
    opacity: 1;
    visibility: visible;
    height: 100%;
}


/* X - Close modal button */

.close-modal {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    font-weight: 400;
    text-align: center;
    line-height: 40px;
    font-size: 40px;
    cursor: pointer;
    color: $color-border;
    user-select: none;
    -moz-user-select: none;
    transition: color 0.2s linear;
}

.close-modal:hover {
    color: #fff;
}

.notes-area {
    width: 100%;
    margin: 0;
    padding: 10px;
    background-color: $color-background;
    border: 1px solid $color-border;
    ;
    color: #fff;
    height: 250px;
    transition: 0.2s linear;
}

.notes-area:focus {
    border: $focused-border;
    box-shadow: $focused-box-shadow;
}

.todo-input {
    flex-grow: 1;
    width: 100px;
}


/* error message under input box */

.input-error {
    font-size: 12px;
    height: 20px;
}

.notes-todo-list {
    margin: 20px 40px 40px;
    display: flex;
    flex-flow: column;
}

.notes-todo-list .row:nth-child(-n+1) {
    border-top: 1px solid $color-border;
}

.notes-todo-list .row {
    border-bottom: 1px solid $color-border;
    padding: 10px 0;
}

.notes-todo-list input[type="checkbox"] {
    margin-right: 10px;
    align-self: center; // vertically center checkbox
}

.notes-todo-list label {
    -moz-user-select: none;
    user-select: none;
    -webkit-user-select: none;
    flex-grow: 1;
}

.strikethrough:checked+label {
    text-decoration: line-through;
}

.notes-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

.notes-container .half {
    padding: 0 20px;
}

.todo-items-counter {
    margin: 0 40px;
    align-self: center;
}

.button {
    color: $color-border;
    ;
    border: 1px solid $color-border;
    ;
    background: $color-background;
    padding: 0 20px;
    height: 40px;
    line-height: 38px;
    user-select: none;
    -moz-user-select: none;
    cursor: pointer;
    transition: all 0.2s linear;
    margin: 5px;
    font-family: 'Lato';
}

.button:hover,
.button:focus {
    color: $color-link-focused;
    border: $focused-border;
}

.button::-moz-focus-inner {
    border: 0;
}

.button-active {
    color: $color-link-focused;
    border: $focused-border;
}

.todo-btn {
    height: 20px;
    line-height: 100%;
    padding: 0 10px;
    margin: 0 5px;
}

.btn-save-tasks {
    height: 30px;
    line-height: 30px;
    align-self: center;
}

#todo-edit-modal {
    width: 500px;
    max-width: 100%;
    height: auto;
    z-index: 5;
}

#todo-overlay {
    z-index: 4;
    left: 0;
    top: 0;
}

#todo-edit-modal.visible {
    display: block;
    opacity: 1;
}


/* CONFIGURATOR */

.configurator .row {
    width: 100%;
    display: flex;
    border-bottom: 1px solid $color-border;
    padding: 10px;
}

.configurator .row h3 {
    min-width: 200px;
}


/*
.options label {
  float: left;
  padding-right: 20px;
  text-align: center;
}
*/


/* radio buttons */

.options .radio {
    text-align: center;
    position: relative;
    height: 30px;
}

.radio label {
    display: block;
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0 30px;
    color: $color-border;
    transition: color 0.25s linear;
    z-index: 1;
    user-select: none;
    -moz-user-select: none;
}

.radio:hover label {
    color: #fff;
}

.radio input[type=radio] {
    visibility: hidden;
    position: absolute;
}

.radio:hover .check {
    border: 2px solid #ccc;
}

.radio .check {
    display: block;
    position: absolute;
    left: 0;
    top: 0px;
    width: 20px;
    height: 20px;
    border: 2px solid $color-border;
    ;
    border-radius: 100%;
    transition: all 0.25s linear;
}

.radio .check::before {
    display: block;
    position: absolute;
    content: "";
    border-radius: 100%;
    height: 10px;
    width: 10px;
    top: 3px;
    left: 3px;
    transition: all 0.25s linear;
}

.radio input[type=radio]:checked~.check {
    border: 2px solid #fff;
}

.radio input[type=radio]:checked~.check::before {
    background: #fff;
}

input[type=radio]:checked~label {
    color: #fff;
}


/* end of radio buttons */

.input-small {
    max-width: 200px;
    max-height: 30px;
    padding: 0 5px;
}

.navbar {
    display: flex;
    padding: 20px 0;
    justify-content: center;
}

.navbar-button {
    border: 2px solid white;
    min-height: 40px;
    min-width: 120px;
    line-height: 40px;
    text-align: center;
    user-select: none;
    -moz-user-select: none;
    cursor: pointer;
    text-overflow: ellipsis;
}

.navbar-button-left {
    border-radius: 5px 0 0 5px;
}

.navbar-button-right {
    border-radius: 0 5px 5px 0;
}

.navbar-button.active {
    background-color: #fff;
    color: $color-background;
}


/* styled radio buttons */


/* Media screens */

@media screen and (max-width: 500px) {
    .arrow {
        display: none;
    }
    .slide {
        padding: 0 10px;
    }
}


/*Switch*/

.switch-container {
    display: flex;
    align-items: center;
}

.switch-container p {
    padding: 0 5px;
}

.switch,
.switch-tiny {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 27px;
}

.switch-tiny {
    height: 27px;
    width: 60px;
}

.switch input,
.switch-tiny input {
    opacity: 0;
    position: absolute;
    z-index: 10;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.switch-button,
.switch-button-tiny {
    position: absolute;
    cursor: pointer;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    border: 2px solid $color-background;
    transition: 0.4s cubic-bezier(.22, .61, .36, 1);
    border-radius: 35px;
}

.switch-button:before,
.switch-button-tiny:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    top: 3px;
    left: 4px;
    background-color: $color-background;
    transition: 0.4s cubic-bezier(.22, .61, .36, 1);
    border-radius: 100%;
}

.switch-button-tiny:before {
    width: 17px;
    height: 17px;
    top: 3px;
    left: 4px;
}

.switch:checked+.switch-button,
.switch-tiny:checked+.switch-button-tiny {
    background-color: $color-background;
    border-color: #f9f9f9;
}

.switch:checked+.switch-button:before {
    background-color: #f9f9f9;
    transform: translateX(31px);
}

.switch-tiny:checked+.switch-button-tiny:before {
    background-color: #f9f9f9;
    transform: translateX(32px);
}


/* END OF CONFIGURATOR */


/* UTILITIES */

.half {
    width: 50%;
}

.row {
    display: flex;
    width: 100%;
}

.row-wrap {
    flex-wrap: wrap;
}

.margin-v-0 {
    margin-top: 0;
    margin-bottom: 0;
}

.margin-v-10 {
    margin: 10px 0;
}

.margin-v-20 {
    margin: 20px 0;
}

.margin-b-20 {
    margin-bottom: 20px;
}

.noscroll {
    overflow: hidden;
}

.close-button {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 40px;
    line-height: 40px;
    width: 40px;
    text-align: center;
    color: $color-border;
    ;
    font-weight: 400;
    transition: $transition-fast;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
}

.close-button:hover {
    color: $color-link-focused;
}

.center {
    text-align: center;
    justify-content: center;
}